/******************* (C) COPYRIGHT 2022 CHU WEI TENG ***********************************************
**
**------------------ File Info ---------------------------------------------------------------------
** File name:      dwin_windows.h
** modified Date:  2022-05-10
** Last Version:   V1.0
** Descriptions: 
** 
**------------------ Modfication  log --------------------------------------------------------------
** Date       Who            Rev        Comments
----------------------------------------------------------------------------------------------------
   22/05/10  chuwt@qq.com    V1.00      created

****************************************************************************************************/
#ifndef __DWIN_WINDOWS_H__
#define __DWIN_WINDOWS_H__

#include "dwin_widget.h"

/* Public define-----------------------------------------------------------------------------------*/

/* Public typedef----------------------------------------------------------------------------------*/

/**
 * @class   dwin_windows_t
 * @parent  diwn_widget_t
 * @node 
**/
typedef struct
{
    dwin_widget_t   widget;
    dwin_list_t     list; 
    uint16_t        windows_id;
    uint16_t        curr_page_id;
}dwin_windows_t;

/* Public function---------------------------------------------------------------------------------*/
ret_t dwin_windows_init(dwin_widget_t* windows);

ret_t dwin_windows_widget_add(dwin_widget_t* windows, dwin_widget_t* widget);
ret_t dwin_windwos_widget_remove(dwin_widget_t* widget);

ret_t dwin_windows_open(dwin_widget_t* windows);
ret_t dwin_windows_close(dwin_widget_t* windows);
ret_t dwin_windows_run(dwin_widget_t* windows);

ret_t dwin_windwos_curr_page_set(dwin_widget_t* windows, uint16_t page_id);
ret_t dwin_windows_jump(uint16_t page_id);

#endif
